IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'spReportsFoldersReadyForMerging_Update')
	BEGIN
		PRINT 'Dropping Procedure spReportsFoldersReadyForMerging_Update'
		DROP  Procedure  spReportsFoldersReadyForMerging_Update
	END

GO

PRINT 'Creating Procedure spReportsFoldersReadyForMerging_Update'
GO
Create Procedure dbo.spReportsFoldersReadyForMerging_Update
	( 	  
		@tuser char(8) = null, 
		@FILENO char(20), 
		@d_id varchar(50) = null, 
		@d_folder varchar(50) = null, 
		@d_loc varchar(50) = null, 
		@ILPNO char(20) = null, 
		@a_code char(8) = null, 
		@a_desc char(30) = null, 
		@a_from char(10) = null, 
		@a_to char(10) = null, 
		@d_status varchar(50) = null, 
		@d_match bit = null, 
		@d_exist bit = null, 
		@FSTATUS char(10) = null, 
		@LOCNO char(10) = null, 
		@d_accno varchar(50) = null, 
		@d_doctype varchar(50) = null, 
		@d_lasttran DateTime = null
	)
AS
  /* 
    ------------------------------------------------------------------------------
    - Change History
    - --------------
    - Date          Description
    ------------------------------------------------------------------------------
    - 10/15/2007    Initial version Updated
    ------------------------------------------------------------------------------
  */

	-- Declare the required variables

	-- Update the required new record
	UPDATE ReportsFoldersReadyForMerging
	SET
		tuser = @tuser, 
		FILENO = @FILENO, 
		d_folder = @d_folder, 
		d_loc = @d_loc, 
		ILPNO = @ILPNO, 
		a_code = @a_code, 
		a_desc = @a_desc, 
		a_from = @a_from, 
		a_to = @a_to, 
		d_status = @d_status, 
		d_match = @d_match, 
		d_exist = @d_exist, 
		FSTATUS = @FSTATUS, 
		LOCNO = @LOCNO, 
		d_accno = @d_accno, 
		d_doctype = @d_doctype, 
		d_lasttran = @d_lasttran		
	WHERE d_id = @d_id

	-- Return to calling method
	RETURN
	
GO
